package com.telit.common.pojo;

import com.telit.common.constant.NoticeTypeConstants;
import lombok.*;

import javax.validation.constraints.NotBlank;


/**
 * @Auther amy
 * @Describe 阿里云推送消息内容实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AliPushContentPojo {

    /** 消息的类型,1是普通消息通知,2是音视频通话消息通知...**/
    @NotBlank(message = "消息主体不能为空")
    private Integer noticeType = NoticeTypeConstants.NOTICE_TYPE_NORMAL;

    /** 消息的主体部分,如果是对象或者是map,转成json字符串,JSON.toJSONString(object) **/
    @NotBlank(message = "消息主体不能为空")
    private String content;

    /** 扩展字段 **/
    private String remark;

    public AliPushContentPojo(Integer noticeType,String content){
        this.noticeType = noticeType;
        this.content = content;
    }

    public AliPushContentPojo(String content){
        this.content = content;
    }
}
